<?php
class Codingfrenzy extends CI_Controller{
	function __construct(){
		parent::__construct();
		$this->config->load('facebook_config');//load the config file
	    $this->load->helper('facebook_like_helper'); //load the helper
	   
	}
	
	function index(){
		$data['url']=current_url();
	    $data['option']=$this->config->item('fb_like');
		$this->load->model('entry_model');
		$data['records'] = $this->entry_model->get_entry_publish();
		$data['main_content'] = 'codingfrenzy_view';
		$this->load->view('includes/template', $data);
	}
	
	function entry(){
		$data['url']=current_url();
	    $data['option']=$this->config->item('fb_like');
		$this->load->model('entry_model');
		$data['record'] = $this->entry_model->get_entry_content();
		$data['main_content'] = 'content_view';
		$this->load->view('includes/template', $data);
	}
	
	function category(){
		$data['url']=current_url();
	    $data['option']=$this->config->item('fb_like');
		$this->load->model('entry_model');
		$data['records'] = $this->entry_model->get_entry_category();
		$data['main_content'] = 'category_content_view';
		$this->load->view('includes/template', $data);
	
	}
	
	function sitemap(){
		$data['url']=current_url();
	    $data['option']=$this->config->item('fb_like');
		$this->load->model('entry_model');
		$data['records'] = $this->entry_model->get_entry_publish();
		$this->load->model('category_model');
		$data['categories'] = $this->category_model->get_valid_category();
		$data['main_content'] = 'sitemap_view';
		$this->load->view('includes/template', $data);
	}
	
	function downloads(){
		$data['url']=current_url();
	    $data['option']=$this->config->item('fb_like');
	    $data['main_content'] = 'download_view';
	    $this->load->view('includes/template', $data);
	}
	
	function faqs(){
		$data['url']=current_url();
	    $data['option']=$this->config->item('fb_like');
	    $data['main_content'] = 'faqs_view';
	    $this->load->view('includes/template', $data);
	}
	
	function about_us(){
		$data['url']=current_url();
	    $data['option']=$this->config->item('fb_like');
	    $data['main_content'] = 'about_us_view';
	    $this->load->view('includes/template', $data);
	}
	
	function contact(){
		$data['url']=current_url();
	    $data['option']=$this->config->item('fb_like');
	    $data['main_content'] = 'contact_view';
	    $this->load->view('includes/template', $data);
	
	}

}